<?php
 define('IN_DAEM', true); include '../includes/init.php'; include '../templateManage/templateConfig.php'; $type = empty($_GET["type"]) ? "outer" : $_GET["type"]; if($type == "inner") { include './templateConfigInner.php'; } $userAry = get_user_realname(); $dataAry = array(); $query = "select [ID]
      ,[templateId]
      ,[templateName]
      ,[outboard]
      ,[certificate]
      ,[productCatalog]
      ,[catalog]
      ,[TemplateCatalog]
      ,[paramName]
      ,[filePath]
      ,[fileName]
      ,[builder]
      ,[createDateTime]
      ,[approver]
      ,[approverStatus]
      ,[approverDateTime]
      ,[status]
      ,[typeOf]
      ,[coolType] from [DRSDatabase].[dbo].[TemplateEntity] where [typeOf] = '".$type."'"; $stmt = $conn->query( $query ); while ( $row = $stmt->fetch( PDO::FETCH_ASSOC ) ){ $row['fileName'] = ltrim(strrchr($row['filePath'],'//'),'\/'); $dataAry[] = $row; } $dataAryCount = count($dataAry); include template();